package org.jeecg.modules.demo.crm.glm.util;

import org.springframework.web.multipart.MultipartFile;

import java.util.Base64;

public class ImageUtils {
    public static String encodeFileToBase64(MultipartFile file) throws Exception {
        byte[] fileBytes = file.getBytes();
        return Base64.getEncoder().encodeToString(fileBytes);
    }


}